home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.20010306-20010921
/
000166_jaltman@watsun.cc.columbia.edu_Tue May 22 10:49:11 EDT 2001.msg
< prev
next >
Wrap
Text File
|
2001-09-20
|
2KB
|
44 lines
Article: 12463 of comp.protocols.kermit.misc
Path: newsmaster.cc.columbia.edu!watsun.cc.columbia.edu!jaltman
From: jaltman@watsun.cc.columbia.edu (Jeffrey Altman)
Newsgroups: comp.protocols.kermit.misc
Subject: Re: testing a TCP port and logging response
Date: 22 May 2001 04:04:31 GMT
Organization: Columbia University
Lines: 27
Message-ID: <9ecogf$3jb$1@newsmaster.cc.columbia.edu>
References: <3B09E25B.8117DD48@adelaide.edu.au>
NNTP-Posting-Host: watsun.cc.columbia.edu
X-Trace: newsmaster.cc.columbia.edu 990504271 3691 128.59.39.2 (22 May 2001 04:04:31 GMT)
X-Complaints-To: postmaster@columbia.edu
NNTP-Posting-Date: 22 May 2001 04:04:31 GMT
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:12463
In article <3B09E25B.8117DD48@adelaide.edu.au>,
Arthur Marsh <arthur.marsh@adelaide.edu.au> wrote:
: Hi, when using C-Kermit on a Unix machine to check that a service is
: alive by running:
:
: echo 'set port localhost 99'|kermit
:
: the shell (ksh on Tru64 4.0E) seems to show the same status both for
: successful connections and "connection refused" situations.
A couple of issues here. first, you are using pipes so it is unclear
which process generates the return code. Second, you are not instructing
Kermit to return a value.
: How would one set C-Kermit to test a TCP port, (waiting only a few
: seconds for a response and not a long timeout), return a success/failure
: status to the calling shell, and save any response from the connection
: attempt to a file?
If you want to do this on the command line
kermit -C "set host localhost 99, if failure exit 1, close, exit 0"
Jeffrey Altman * Sr.Software Designer C-Kermit 7.1 Alpha available
The Kermit Project @ Columbia University includes Secure Telnet and FTP
http://www.kermit-project.org/ using Kerberos, SRP, and
kermit-support@kermit-project.org OpenSSL. SSH soon to follow.